import * as Cesium from 'cesium/Cesium';

export default class ImageProviderViewModels {
    constructor() {

    }
    
    NATURALEARTHIMAGE() {
       
        return new  Cesium.TileMapServiceImageryProvider({ url: Cesium.buildModuleUrl('Assets/Textures/NaturalEarthII') })
    }
    GOOGLEIMAGE() {
        return new Cesium.UrlTemplateImageryProvider({ url: '/bigmap/tile/gettile/GoogleChinaSatelliteHybird/{z}/{x}/{y}' })
    }
    //地球夜景
    GOOGLEGEOMORPHOLOGY() {
        return new Cesium.UrlTemplateImageryProvider({ url: '/bigmap/tile/gettile/GoogleChinaTerrain/{z}/{x}/{y}' })
    }
    //天地图
    TDTIMAGE() {
        
        return new Cesium.WebMapTileServiceImageryProvider({
            url: 'http://t0.tianditu.com/img_w/wmts?service=wmts&request=GetTile&version=1.0.0&LAYER=img&tileMatrixSet=w&TileMatrix={TileMatrix}&TileRow={TileRow}&TileCol={TileCol}&style=default&format=tiles&tk=f4d0553a23372a2f48c74851c7e46f4d',
            layer: 'tdt',
            minimumLevel: 0,
            maximumLevel: 18,
            style: 'default',
            tileMatrixSetID: 'w',
            format: 'image/jpeg',
        })
    }
    TDTVECTOR() {
        return new Cesium.WebMapTileServiceImageryProvider({
            url: "http://{s}.tianditu.gov.cn/vec_c/wmts?service=wmts&request=GetTile&version=1.0.0" +
                "&LAYER=vec&tileMatrixSet=c&TileMatrix={TileMatrix}&TileRow={TileRow}&TileCol={TileCol}" +
                "&style=default&format=tiles&tk=f4d0553a23372a2f48c74851c7e46f4d",
            layer: "gdVecBasicLayer",
            style: "default",
            format: "tiles",
            tileMatrixSetID: "c",
            subdomains: ["t0", "t1", "t2", "t3", "t4", "t5", "t6", "t7"],
            tilingScheme: new Cesium.GeographicTilingScheme(),
            tileMatrixLabels: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15",
                "16", "17", "18", "19"
            ],
            maximumLevel: 18,
        })
    }
    //高德地图
    GDIMAGE() {
        return new Cesium.WebMapTileServiceImageryProvider({
            url: 'https://webst02.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}',
            layer: 'tdt',
            minimumLevel: 0,
            maximumLevel: 18,
            style: 'default',
            tileMatrixSetID: 'w',
            format: 'image/jpeg',
        })
    }
    //Bing地图
    BINGIMAGE() {
        return   Cesium.createWorldImagery({
            style: Cesium.IonWorldImageryStyle.AERIAL
        });
    }
    BINGVECTOR() {
        return Cesium.createWorldImagery({
            style: Cesium.IonWorldImageryStyle.AERIAL_WITH_LABELS
        });
    }
    BINGROUTER() {
        return Cesium.createWorldImagery({
            style: Cesium.IonWorldImageryStyle.ROAD
        });
    }

    //MApBox
    MAPBOXIMAGE() {
        return new Cesium.MapboxImageryProvider({
            mapId: 'mapbox.satellite'
        });
    }
    MAPBOXSTREETS() {
        return new Cesium.MapboxImageryProvider({
            mapId: 'mapbox.streets'
        });
    }
    MAPBOXSTREETSIMAGR(){
        return new Cesium.MapboxImageryProvider({
            mapId: 'mapbox.streets-basic'
        }); 
    }
    //ESRI
    ESRIIMAGE(){
        return new Cesium.ArcGisMapServerImageryProvider({
            url: 'https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer',
            enablePickFeatures: false
        });
    }
    ESRISTREETS(){
        return new Cesium.ArcGisMapServerImageryProvider({
            url: 'https://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer',
            enablePickFeatures: false
        });
    }
    ESRINATURAL(){
        return new Cesium.ArcGisMapServerImageryProvider({
            url: 'https://services.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer/',
            enablePickFeatures: false
        });
    }
    //OSM
    OSMVECTOR(){
        return new  Cesium.OpenStreetMapImageryProvider({
            url: 'https://a.tile.openstreetmap.org/'
        });
    }
    OSMVECTORCOLOR(){
        return new Cesium.OpenStreetMapImageryProvider({
            url: 'https://stamen-tiles.a.ssl.fastly.net/watercolor/',
            credit: 'Map tiles by Stamen Design, under CC BY 3.0. Data by OpenStreetMap, under CC BY SA.'
        }); 
    }
    OSMTONER(){
        return new  Cesium.OpenStreetMapImageryProvider({
            url: 'https://stamen-tiles.a.ssl.fastly.net/toner/',
            credit: 'Map tiles by Stamen Design, under CC BY 3.0. Data by OpenStreetMap, under CC BY SA.'
        });
    }
    //ION
    IONIMAGESENTINEL(){
        return new  Cesium.IonImageryProvider({ assetId: 3954 });
    }
    IONBLURMARNLE(){
        return new  Cesium.IonImageryProvider({ assetId: 3845 });
    }
    IONNIGHT(){
        return  new Cesium.IonImageryProvider({ assetId: 3812 });
    }
}